package task06_02;

import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/5/4 8:11
 * @description:
 */
public class CopyImage {
  public static void main(String[] args)throws Exception {
    FileInputStream f1= new FileInputStream("D:\\1.jpg");
    FileOutputStream f2= new FileOutputStream("1.jpg");
    byte[] bytes= new byte[1024];
    int c1=0;
    while ((c1=f1.read(bytes))!=-1){
      f2.write(bytes,0,c1);
    }
    f1.close();
    f2.close();
  }

}
